from datetime import datetime

from docx.enum.text import WD_PARAGRAPH_ALIGNMENT

from datareport.api.annotation.Font import Font
from datareport.api.annotation.Style import style
from datareport.impl.paragraph.base.BaseParagraph import BaseParagraph

@style(alignment=WD_PARAGRAPH_ALIGNMENT.CENTER,line_spacing=1,space_before=2,space_after=10)
class Title_6(BaseParagraph):

    def __init__(self):
        super().__init__()
        self.sort=0
        self.section=1

    def start(self, conn, year, plt):

        self.fonts.append(Font(text='({}年{}月{}日版本)'.format(year,datetime.now().month,datetime.now().day)))